package march.test_3_13;

import java.util.LinkedList;
import java.util.List;
import java.util.Scanner;

public class TestMain1 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int[] arr = new int[n];
        for (int i = 0; i < n; i++) {
            arr[i] = scanner.nextInt();
        }
        int a = scanner.nextInt();
        int b = scanner.nextInt();
        for(int i = 0; i < a - 1; i++) {
            System.out.print(arr[i]+" ");
        }
        for (int i = b - 1; i >= a - 1; i--) {
            System.out.println(arr[i]+" ");
        }
        for (int i = b; i < n; i++) {
            System.out.println(arr[i]+" ");
        }
    }
}
